<?php
/*
 * 师兄帮忙     模块
 */
namespace Home\Controller;
use Utuo\ForegroundController;
class BrotherHelpController extends ForegroundController
{
	public function _init() {
		//$this->setModelName("LostFound");
		layout(false);
	}
	public function indexAction(){
		echo $this->open_id;
	   $this->display();
	}
	public function publishAction(){
		C('TOKEN_ON',true);
		$this->display();
	}
	public function addAction(){
		C('TOKEN_ON',false);
		$m=D('BrotherHelp');
	if($m->create())
		{  
			$m->add()?$this->ajaxReturn(array('state'=>1,'msg'=>'您的小纸条已经发布成功')):$this->ajaxReturn(array('state'=>0,'msg'=>'发布失败'));
		}else{
		echo 	$m->getError();
		}
	}
}